package slidev

import (
	"dustbe/util"
	"fmt"
	"os"
	"runtime"
)

var (
	SlidevIndexPath string
)

func init() {
	switch runtime.GOOS {
	case "windows":
		{
			SlidevIndexPath = "E:/AcademicData/答辩与演讲/SlidevWs/index.json"
		}
	case "linux":
		{
			SlidevIndexPath = "/usr/share/nginx/ppt/index.json"
		}
	}

	pptIndexExist, _ := util.CheckFilePath(SlidevIndexPath)

	if !util.Debug && !pptIndexExist {
		fmt.Printf("ppt index %s doesn't exist!\n", SlidevIndexPath)
		os.Exit(-1)
	}
}
